#include "Gravity.h"


Gravity::Gravity()
{
	g = -9.81;
	active = true;
}

Gravity::Gravity(float _g)
{
	g = _g;
	active = true;
}


Gravity::~Gravity(void)
{
}

void Gravity::update(int delta)
{
	if(!active)
		return;

	for(std::list<Particle*>::iterator I=particles.begin(); I!=particles.end(); ++I)
	{
		(*I)->force.y += g;
	}
}